import { IToolTip } from "../../../../com/mui/manager/IToolTip";
import { TitleName } from "../../scene/player/TitleName";
import { Cache } from "../../cache/Cache";
import { HTMLUtil } from "../../../../com/gengine/utils/HTMLUtil";
//class TitleToolTip
    
    export  class TitleToolTip /* flash.display.Sprite */ implements IToolTip
    {
        constructor()
        {
            
            this.createChildren();
            return;
        }

        public get isGuildNameUseForHtml(): Boolean
        {
            return this._isGuildNameUseForHtml;
        }

        public set isGuildNameUseForHtml(arg1: Boolean)
        {
            this._isGuildNameUseForHtml = arg1;
            return;
        }

        protected createChildren(): void
        {
            this._titleName = new TitleName();
            this.addChild(this._titleName);
            return;
        }

        public set data(arg1)
        {
            var loc1="";
            if (Cache.instance.guild.myGuildInfo) 
            {
                loc1 = Cache.instance.guild.myGuildInfo.guildName;
                if (this._isGuildNameUseForHtml) 
                {
                    loc1 = HTMLUtil.replaceHtmlTag(loc1);
                }
            }
            this._titleName.guildName = loc1;
            this._titleName.setInfo(arg1);
            return;
        }

        /* internal */ /* var */_titleName: TitleName;

        /* internal */ /* var */_isGuildNameUseForHtml: Boolean=false;
    }
